<template>
  <div class="my">  
    <!-- <div class="row" @click="$router.push('/changePassword')">
        <div class="row-title">修改密码</div>
        <div class="isclick"></div>
    </div> -->
    <!-- <row title="用户" :value="userInfo.nickName" ></row> -->
    <row title="修改密码" isclick @rowClick="$router.push('/changePassword')"></row>
    <row title="注销" isclick @rowClick="loginOut"></row>
    <row title="关于我们" isclick @rowClick="aboutUs"></row>
  </div>

</template>

<script>
import row from '@/components/row'
import api from '@/api/api.js' 
export default { 
  components: {
    row
  },
  data () {
    return {
      userInfo:''
    }
  },
  mounted () {
    this.userInfo = JSON.parse(localStorage.hj_userInfo) 
  },
  filters: {
     
  },
  methods: {
    aboutUs(){
      this.$router.push({path:'/aboutUs'})
    },
    loginOut(){
      this.$vux.confirm.show({
        title: '注销',
        content: '确认注销？', 
        onCancel () { 
        },
        onConfirm: ()=> {
          api.user.loginout({},()=>{
            localStorage.hj_userInfo="";
            return this.$vux.toast.show({
              text: '注销成功,请您重新登录',
              type:'text',
              onShow: res=>{
                this.$router.push({path:'/login'})
              }
            })
          })
        }
      })
      
    }
  }
}
</script>
